import logging
import logging.config
import os
import sys

def get_logger(name='root'):
    log_conf= os.path.join(os.getcwd() ,"config", "config_logger.ini")

    logging.config.fileConfig(log_conf)
    return logging.getLogger(name)
 
 
logger= get_logger(__name__)

if __name__ == '__main__':
    logger.info("start")
    
    try:
        print(1 / 0)
    except Exception:
        logger.error("error:")
        logger.exception(sys.exc_info())
    logger.debug("end")
